<?php
error_reporting(E_ALL);
define('MIDP', TRUE);
define('ROOT', substr(dirname(__FILE__), 0, -1));
define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());

set_magic_quotes_runtime(0);
session_start();
//Run Time，Use Time() Minutes this $mtime
$mtime = explode(' ', microtime());
$timestart = $mtime[1] + $mtime[0];

include_once ROOT."./config.inc.php";
//加载路径配置
require_once $funcdir.'./global.func.php';

include _path('inc/lib');
include _path('inc/safe');
//加载全局函数（调用库）
include _path('class/base');
require _path('class/midp');
include _path('class/data');
require _path('inc/smarty');
//require _path('class/db_mysql');
//require _path('inc/smarty');

$timestamp = time();
/*$db = new dbstuff;
$db->connect($db_server, $db_user, $db_pass, $db_name, 0, true);
$db_user = $db_pswd = $db_name = $pconnect = NULL;*/
$db = Midp::getInstance('db');
$tpl = initSmarty();
//初始化变量

//加载缓存
$tpl->assign('cssurl', $cssurl);
$tpl->assign('jqurl', $jqurl);
$tpl->assign('jsurl', $jsurl);
$tpl->assign('imgdir', $imgurl."default/");
$tpl->assign('imgurl', $imgurl);
//$tpl->assign('timestart', $timestart);
//初始化配置
?>